<!DOCTYPE html>
<html lang="en" xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:a="http://java.sun.com/jsf/composite/authorisation">
<f:loadBundle basename="ResourceBundle" var="bundle" />
<h:head>
	<title>#{bundle.title}</title>
	<h:outputStylesheet library="css" name="style.css"></h:outputStylesheet>
</h:head>
<h:body>
	<h1>#{bundle.title}</h1>
	<p>
		<a href="/">Home</a> | <a href="home.xhtml">Access Secured
			Resource</a>
	</p>
	<p>
		User Name: #{request.remoteUser} <br /> User Identifier:
		#{request.userPrincipal != null ? request.userPrincipal.name : ''} <br />
		User In JavaEEManagers Role: #{request.isUserInRole('JavaEEManagers')}
		<br /> Session ID: #{request.getSession(false) != null ?
		request.getSession(false).id : ''} <br /> Session Content:
		<h:outputText
			rendered="#{request.getSession(false) != null and request.getSession(false).getAttribute('aDate') != null}"
			value="#{request.getSession(false).getAttribute('aDate')}">
			<f:convertDateTime pattern="EEE MMM d HH:mm:ss z YYYY"
				timeZone="Europe/London" />
		</h:outputText>
		<br />
		<a:guard role="JavaEEManagers">Guarded text</a:guard>
	</p>
</h:body>
</html>